package catchnthrow;

import se.lth.control.realtime.*;

public class ParameterTest extends Thread{

	private AnalogIn in0, in1, in2, in3;
	private AnalogOut out0, out1, out2, out3;
	
	private void initIO() {
		try { 
			in1 = new AnalogIn(1);
			in0 = new AnalogIn(0);
			in2 = new AnalogIn(2);
			in3 = new AnalogIn(3);

			out0 = new AnalogOut(0);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public void run() {
		try {
		initIO();
		while (true) {
			System.out.println("in0: " + in0.get() + "; " +
					"in1: " + in1.get() + "; " +
					"in2: " + in2.get() + "; " +
					"in3: " + in3.get() + "; " );
			try {
				sleep(100);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		} catch (Exception e) {
			
		}
	}

}
